package com.javafactroy.kunlong.data.entity;

import lombok.Data;

import com.javafactroy.kunlong.client.feign.dto.PageInfoDto;

import javax.persistence.Column;
import javax.persistence.*;
import java.util.Date;
//import javax.persistence.Id;

import lombok.experimental.Accessors;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import com.alibaba.excel.annotation.write.style.ColumnWidth;

import io.swagger.annotations.ApiModelProperty;

/**
 * @author raymond.lei@163.com
 * @date 2023-11-27 17:25:33
 * @file SysDictDataApiEntity.java
 * @company com.javafactroy.kunlong
 */
@Data
@Table(name = "sys_dict_data")
@ApiModel("字典数据表")
@Accessors(chain = true)
@ExcelIgnoreUnannotated
@ColumnWidth(18)
public class SysDictDataApiEntity extends PageInfoDto {
    private static final long serialVersionUID = 1L; //一会就说这个是做什么的

    // 字典编码 dataType:bigint
    @ApiModelProperty(name = "字典编码")
    @ExcelProperty("字典编码")
    @Column(name = "dict_code")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "Mysql")
    Long dictCode;

    // 字典排序 dataType:int
    @ApiModelProperty(name = "字典排序")
    @ExcelProperty("字典排序")
    @Column(name = "dict_sort")
    Integer dictSort;

    // 字典标签 dataType:varchar
    @ApiModelProperty(name = "字典标签")
    @ExcelProperty("字典标签")
    @Column(name = "dict_label")
    String dictLabel;

    // 字典键值 dataType:varchar
    @ApiModelProperty(name = "字典键值")
    @ExcelProperty("字典键值")
    @Column(name = "dict_value")
    String dictValue;

    // 字典类型 dataType:varchar
    @ApiModelProperty(name = "字典类型")
    @ExcelProperty("字典类型")
    @Column(name = "dict_type")
    String dictType;

    // 样式属性（其他样式扩展） dataType:varchar
    @ApiModelProperty(name = "样式属性（其他样式扩展）")
    @ExcelProperty("样式属性（其他样式扩展）")
    @Column(name = "css_class")
    String cssClass;

    // 表格回显样式 dataType:varchar
    @ApiModelProperty(name = "表格回显样式")
    @ExcelProperty("表格回显样式")
    @Column(name = "list_class")
    String listClass;

    // 是否默认（Y是 N否） dataType:char
    @ApiModelProperty(name = "是否默认（Y是 N否）")
    @ExcelProperty("是否默认（Y是 N否）")
    @Column(name = "is_default")
    String isDefault;

    // 状态（0正常 1停用） dataType:char
    @ApiModelProperty(name = "状态（0正常 1停用）")
    @ExcelProperty("状态（0正常 1停用）")
    @Column(name = "status")
    String status;

    // 创建者 dataType:varchar
    @ApiModelProperty(name = "创建者")
    @ExcelProperty("创建者")
    @Column(name = "create_by")
    String createBy;

    // 创建时间 dataType:datetime
    @ApiModelProperty(name = "创建时间")
    @ExcelProperty("创建时间")
    @Column(name = "create_time")
    Date createTime;

    // 更新者 dataType:varchar
    @ApiModelProperty(name = "更新者")
    @ExcelProperty("更新者")
    @Column(name = "update_by")
    String updateBy;

    // 更新时间 dataType:datetime
    @ApiModelProperty(name = "更新时间")
    @ExcelProperty("更新时间")
    @Column(name = "update_time")
    Date updateTime;

    // 备注 dataType:varchar
    @ApiModelProperty(name = "备注")
    @ExcelProperty("备注")
    @Column(name = "remark")
    String remark;
    public Boolean checkInsertFlag() {
        return dictCode == null;//super.checkInsertFlag();
    }


}